## Constraints

- easy to implement
- as reduced disk size as possible
- extendable toward other batch related data (fluxes, k-effectives, ...)
- simple format to be read by many tools (matlab/scilab, python, java, fortran, ...)

## Ideas

- 1 general information file close to benchmark 4 specification
- data files in binary format to reduce disk size necessary
- 1 file per batch and data
- 1 directory by type of data
- final archiving/compacting of all files and dirs at the end of calculation

Future works :

- simple interface library in matlab/scilab or python to access content of data
- 3D GUI to view sources positions evolving during simulation. Example:

## Example

Please note the following informations:

- all text within parenthesis (including files content) is just comment, should be deleted in a real case
- [OPTIONAL] marks optional data which maybe not present
- “data” files are all anydata.1, anydata.2, anydata.n files, and maybe written in ASCII or binary format (as defined in info.txt). Binary format is surely more interesting for large amount of data !
- “format” files are all anydata.format files, containing a template for binary “data” files written in ASCII.

Content of a “.bar” (as Batch ARchive) (g)zip directory :

- dataset.bar (gzip archive containing following files and directories)
  - info.txt (ASCII general information about calculation)

    file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/info.txt

        OECD/WPNCS benchmark 4 (name of the benchmark)
        2006-09-01 (date of processing)
        IRSN/Yann Richet <yann.richet@irsn.fr> (company, user & contact info if possible)
        JEF2.2 - Apollo 2.5p5 - Moret 4.B.3 (name and version of code(s), if possible nuclear data library)
        super-history 10 generations (precise simulation method used)
        x86_64 GNU/Linux (description of hardware and software plateform)
        ASCII (content of data files *.1, *.2, *.n : big endian, little endian, or ASCII)
        0 (number of batches skipped before beginning tallies)
        1000 (number of batches)
        1 (increment of recorded batches, by default "1" which means each batch is recorded, but should also be "10" if you want to reduce archive size)
        126 (number of initial sources)
        1.0 (rate of sources recorded, by default "1.0" which means all sources are recorded, but maybe 0.5 or 0.01 if you want to reduce archive size)

  - starter/ (directory containing all starters related files)
    - starter.format (ASCII template description for following starters.n files, each line containing data name and data type separated by space char)

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/starter/starter.format

          x float
          y float
          z float
          weight float
          energy_group int
          (other data if necessary)

    - starters.1 (starters positions following several times starter.format template)

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/starter/starters.1

          126 (integer : number of neutrons in the first batch, which should be in binary format)
          0.0 (x position of first neutron, type is float as described in starter.format file)
          0.0 (y position of first neutron, type is float)
          0.0 (z position of first neutron, type is float)
          1.0 (weight of first neutron, type is float)
          1 (energy group of first neutron, type is int)
          0.0 (x position of second neutron, type is float as described in starter.format file)
          80.0 (y position of secondneutron, type is float)
          0.0 (y position of second neutron, type is float)
          1.0 (weight of second neutron, type is float)
          1 (energy group of second neutron, type is int)
          ...
          ...
          ...
          320.0 (x position of last neutron, type is float as described in starter.format file)
          320.0 (y position of last neutron, type is float)
          0.0 (z position of last neutron, type is float)
          1.0 (weight of last neutron, type is float)
          1 (energy group of last neutron, type is int)

    - starters.2

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/starter/starters.2

          124 (integer : number of neutrons in the 2nd batch)
          45.45 (x position of first neutron, type is float as described in starter.format file)
          68.5 (y position of first neutron, type is float)
          23.250 (z position of first neutron, type is float)
          1.001 (weight of first neutron, type is float)
          12 (energy group of first neutron, type is int)
          65.7 (x position of second neutron, type is float as described in starter.format file)
          80.7 (y position of secondneutron, type is float)
          10.05 (y position of second neutron, type is float)
          0.991 (weight of second neutron, type is float)
          15 (energy group of second neutron, type is int)
          ...
          ...
          ...
          65.75 (x position of last neutron, type is float as described in starter.format file)
          56.78 (y position of last neutron, type is float)
          12.7 (z position of last neutron, type is float)
          1.007 (weight of last neutron, type is float)
          172 (energy group of last neutron, type is int)

    - starters.???

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/starter/starters.???

          12? (integer : number of neutrons in the ??? batch)
          45.45 (x position of first neutron, type is float as described in starter.format file)
          68.5 (y position of first neutron, type is float)
          23.250 (z position of first neutron, type is float)
          1.001 (weight of first neutron, type is float)
          12 (energy group of first neutron, type is int)
          65.7 (x position of second neutron, type is float as described in starter.format file)
          80.7 (y position of secondneutron, type is float)
          10.05 (y position of second neutron, type is float)
          0.991 (weight of second neutron, type is float)
          15 (energy group of second neutron, type is int)
          ...
          ...
          ...
          65.75 (x position of last neutron, type is float as described in starter.format file)
          56.78 (y position of last neutron, type is float)
          12.7 (z position of last neutron, type is float)
          1.007 (weight of last neutron, type is float)
          172 (energy group of last neutron, type is int)

    - starters.1000

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/starter/starters.1000

          128 (integer : number of neutrons in the 1000th batch)
          45.45 (x position of first neutron, type is float as described in starter.format file)
          68.5 (y position of first neutron, type is float)
          23.250 (z position of first neutron, type is float)
          1.001 (weight of first neutron, type is float)
          12 (energy group of first neutron, type is int)
          65.7 (x position of second neutron, type is float as described in starter.format file)
          80.7 (y position of secondneutron, type is float)
          10.05 (y position of second neutron, type is float)
          0.991 (weight of second neutron, type is float)
          15 (energy group of second neutron, type is int)
          ...
          ...
          ...
          65.75 (x position of last neutron, type is float as described in starter.format file)
          56.78 (y position of last neutron, type is float)
          12.7 (z position of last neutron, type is float)
          1.007 (weight of last neutron, type is float)
          172 (energy group of last neutron, type is int)

  - keff/ [OPTIONAL] (directory containing all keff related files)
    - keff.format (ASCII template description for following keffs.n files, each line containing data name and data type separated by space char)

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/keff/keff.format

          track_length float
          scattering float
          absorption float

    - keffs.1 (keffs values following keff.format template)

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/keff/keffs.1

          0.95012 (track-length estimation of first batch k-effective)
          0.96023 (scattering estimation of first batch k-effective)
          0.94025 (absoption estimation of first batch k-effective)

    - keffs.2

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/keff/keffs.2

          0.95012 (track-length estimation of second batch k-effective)
          nan (scattering estimation of second batch k-effective : if estimation was not available, return NaN)
          0.94025 (absoption estimation of second batch k-effective)

    - keffs.???

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/keff/keffs.???

          0.95012 (track-length estimation of a batch k-effective)
          0.96023 (scattering estimation of a batch k-effective)
          0.94025 (absoption estimation of a batch k-effective)

    - keffs.1000

      file: /irsn/local01/codes/MORET4/EG SC OCDE/nouvelles_sorties_2006/dataset.bar/keff/keffs.1000

          0.95012 (track-length estimation of last batch k-effective)
          0.96023 (scattering estimation of last batch k-effective)
          0.94025 (absoption estimation of last batch k-effective)

  - input/ [OPTIONAL] (directory containing all input files of calculation)
    - dataset
  - output/ [OPTIONAL] (directory containing all output files of calculation)
    - dataset.out
    - dataset.out2